package springboot.bean;

import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Objects;

@Component
public class Response implements Serializable {
    private String uUID;
    private String requestAPI;
    private int code;
    private String message;
    private String reserve1;
    private String reserve2;
    private String reserve3;
    private String reserve4;
    private String reserve5;

    public String getuUID() {
        return uUID;
    }

    public void setuUID(String uUID) {
        this.uUID = uUID;
    }

    public String getRequestAPI() {
        return requestAPI;
    }

    public void setRequestAPI(String requestAPI) {
        this.requestAPI = requestAPI;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getReserve1() {
        return reserve1;
    }

    public void setReserve1(String reserve1) {
        this.reserve1 = reserve1;
    }

    public String getReserve2() {
        return reserve2;
    }

    public void setReserve2(String reserve2) {
        this.reserve2 = reserve2;
    }

    public String getReserve3() {
        return reserve3;
    }

    public void setReserve3(String reserve3) {
        this.reserve3 = reserve3;
    }

    public String getReserve4() {
        return reserve4;
    }

    public void setReserve4(String reserve4) {
        this.reserve4 = reserve4;
    }

    public String getReserve5() {
        return reserve5;
    }

    public void setReserve5(String reserve5) {
        this.reserve5 = reserve5;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Response response = (Response) o;
        return code == response.code &&
                Objects.equals(uUID, response.uUID) &&
                Objects.equals(requestAPI, response.requestAPI) &&
                Objects.equals(message, response.message) &&
                Objects.equals(reserve1, response.reserve1) &&
                Objects.equals(reserve2, response.reserve2) &&
                Objects.equals(reserve3, response.reserve3) &&
                Objects.equals(reserve4, response.reserve4) &&
                Objects.equals(reserve5, response.reserve5);
    }

    @Override
    public int hashCode() {
        return Objects.hash(uUID, requestAPI, code, message, reserve1, reserve2, reserve3, reserve4, reserve5);
    }

    @Override
    public String toString() {
        return "Response{" +
                "uUID='" + uUID + '\'' +
                ", requestAPI='" + requestAPI + '\'' +
                ", code=" + code +
                ", message='" + message + '\'' +
                ", reserve1='" + reserve1 + '\'' +
                ", reserve2='" + reserve2 + '\'' +
                ", reserve3='" + reserve3 + '\'' +
                ", reserve4='" + reserve4 + '\'' +
                ", reserve5='" + reserve5 + '\'' +
                '}';
    }
}
